import { defineStore } from "pinia";
import { ColorModeType, useColorMode } from "@/hooks";

export const useGlobalStore = defineStore("global", () => {
  const { isDark, colorMode } = useColorMode();

  const switchDarkColors = (type: ColorModeType) => {
    colorMode.value = type;
  };

  return {
    isDark,
    colorMode,
    switchDarkColors
  };
});
